﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Lead2012.Business
{
    public class LeadInfo
    {
        public const string c_DateTimeFormat = "yyyy-MM-dd HH:mm:ss";

        #region Properties

        [XmlAttribute]
        public int Id { set; get; }
        [XmlAttribute]
        public string CreationDate { set; get; }
        [XmlAttribute]
        public string LastModifiedDate { set; get; }
        [XmlAttribute]
        public string CampaignId { set; get; }
        [XmlAttribute]
        public string CampaignTitle { set; get; }
        [XmlAttribute]
        public string StatusId { set; get; }
        [XmlAttribute]
        public string StatusTitle { set; get; }

        public LeadAgent Agent { set; get; }
        public List<LeadField> SystemFields { set; get; }
        public List<LeadField> CustomFields { set; get; }
        public LeadCreationLog CreationLogs { set; get; }
        public List<DistributionLog> DistributionLogs { set; get; }
        public List<LeadStatusLog> StatusLogs { set; get; }
        public List<LeadActionLog> ActionLogs { set; get; }
        public List<LeadAssignmentLog> AssignmentLogs { set; get; }
        public List<LeadEmailLog> EmailLogs { set; get; }
        public List<LeadPostLog> PostLogs { set; get; }
        public List<LeadExportLog> ExportLogs { set; get; }
        public List<LeadDialerLog> DialerLogs { set; get; }
        public List<LeadSyncLog> SyncLogs { set; get; }
        public List<LeadDupeLog> DupeLogs { set; get; }
        public List<LeadGeneralLog> GeneralLogs { set; get; }

        #endregion

        #region public methods
        
        #endregion
    }

    public class LeadAgent
    {
        [XmlAttribute]
        public int AgentId { set; get; }
        [XmlAttribute]
        public string AgentName { get; set; }
        [XmlAttribute]
        public string AgentEmail { get; set; }
        [XmlAttribute]
        public int GroupId { get; set; }
        [XmlAttribute]
        public string GroupName { get; set; }
        
    }

    public class LeadField
    {
        [XmlAttribute]
        public int FieldId { set; get; }
        [XmlAttribute]
        public string FieldTitle { get; set; }
        [XmlAttribute]
        public string FieldTypeName { get; set; }
        [XmlAttribute]
        public int FieldTypeId { get; set; }
        [XmlAttribute]
        public string Value { get; set; }
        [XmlAttribute]
        public string ValueId { get; set; }
    }


    public class LeadGeneralLog
    {
        [XmlAttribute]
        public int LogId { set; get; }
        [XmlAttribute]
        public string LogDate { set; get; }
        [XmlAttribute]
        public int LogTypeId { set; get; }
        [XmlAttribute]
        public string LogTypeTitle { set; get; }
        [XmlAttribute]
        public string Note { set; get; }

        public LeadAgent Agent { set; get; }
        
    }
    public class LeadInfoCollection
    {
        public int Total { get; set; }

        public List<LeadInfo> Leads { get; set; }
    }
}
